<template>
  <Field :label="props.label.value">
    <template #input>
      <van-switch size="22px" v-model="checked" />
    </template>
  </Field>
</template>

<script>
import { Field, Switch } from "vant";

export default {
  components: { Field, VanSwitch: Switch },
  props: ["props"],
  watch: {
    props(props) {
      this.checked = props.defaultChecked.value;
    },
  },
  data() {
    return {
      checked: true,
    };
  },
};
</script>